import rxAjax from '@/assets/js/ajax.js';
import AtsHolidayPolicyDetailApi from "@/api/oa/ats/atsHolidayPolicyDetail";

//日历模版明细 api接口
export const AtsCalendarTemplDetailApi = {};

AtsCalendarTemplDetailApi.baseUrl= '/api-oa/oa/ats/atsCalendarTemplDetail';
AtsCalendarTemplDetailApi.exportUrl= AtsCalendarTemplDetailApi.baseUrl + '/listExport';

//查询列表
AtsCalendarTemplDetailApi.query=function (parameter) {
  var url= AtsCalendarTemplDetailApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
AtsCalendarTemplDetailApi.get =function(pkId) {
  var url= AtsCalendarTemplDetailApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
AtsCalendarTemplDetailApi.save =function(parameter) {
  var url= AtsCalendarTemplDetailApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
AtsCalendarTemplDetailApi.del =function(parameter) {
  var url= AtsCalendarTemplDetailApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//查询全部数据
AtsCalendarTemplDetailApi.getAll = function () {
  var url = AtsCalendarTemplDetailApi.baseUrl + '/getAll';
  return rxAjax.get(url);
}

AtsCalendarTemplDetailApi.getCalendarTemplDetailId = function (ctId) {
  var url = AtsCalendarTemplDetailApi.baseUrl + '/getCalendarTemplDetailId?ctId=' + ctId;
  return rxAjax.get(url);
}

export  default AtsCalendarTemplDetailApi;

